package com.yx.study.leet.questionList.questions;

/**
 * 数组自定义输出:[1,2,3]
 * */
public class OutPutArray {
    public static String out(int[] nums) {
        StringBuilder ans = new StringBuilder();
        ans.append("[");
        for (int i = 0; i < nums.length; i++) {
            ans.append(nums[i]);
            if (i != nums.length - 1) {
                ans.append(",");
            }
        }
        return ans.append("]").toString();
    }
}
